<h1>Listing treatments</h1>

<table>
  <thead>
    <tr>
      <th>Appointment</th>
      <th>Treatment group</th>
      <th>Fee</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @treatments.each do |treatment| %>
      <tr>
        <td><%= treatment.appointment.patient.full_name %></td>
        <td><%= treatment.treatment_group.label %></td>
        <td><%= treatment.fee %></td>
        <td><%= link_to 'Show', treatment %></td>
        <td><%= link_to 'Edit', edit_treatment_path(treatment) %></td>
        <td><%= link_to 'Destroy', treatment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Treatment', new_treatment_path %>
